package com.applcn.file.controller;

import com.applcn.core.base.Result;
import com.applcn.file.service.FileService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 文件服务
 */
@RestController
@RequestMapping(value = "/api/file")
@RequiredArgsConstructor
public class FileController {

    private final FileService fileService;

    /**
     * 获取预签名上传图片url
     *
     * @return
     */
    @GetMapping("/generateUploadPicUrl")
    public Result generateUploadPicUrl() {
        return fileService.getCertification(null, "png");
    }
}